const { CleanWebpackPlugin } = require("clean-webpack-plugin")
const HtmlWebpackPlugin = require("html-webpack-plugin")
const CopyWebpackPlugin = require("copy-webpack-plugin")

module.exports = {
  entry: {
    list: './src/list.js',
    detail: './src/detail.js'
  },
  plugins: [

    new HtmlWebpackPlugin({
      template: './public/list.html',
      chunks: ['list'],
      filename: 'list.html',
    }),
    new HtmlWebpackPlugin({
      template: './public/detail.html',
      chunks: ['detail'],
      filename: 'detail.html'
    }),
    new CopyWebpackPlugin({
      patterns: [
        { from: "./src/assets", },
      ],
    })
  ],

  stats: {
    colors: true,
    modules: false
  }
}